<template>
  <div id='app'>
    <router-view></router-view>
  </div>
</template>

<script>
  import { mapMutations, mapGetters, mapState } from 'vuex';
  export default {
    name: 'app',
    watch: {
      $route: function (newVal, oldVal) {
        this.setNav({
          current: newVal.name,
          back: oldVal.name
        });
      }
    },
    computed: {
      ...mapGetters({
        nav: 'getNav'
      })
    },
    methods: {
      ...mapMutations({
        setNav: 'setNav'
      })
    }
  };
</script>

<style>
  html,
  body {
    height: 100%;
  }
  #app {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    width: 100%;
    height: 100%;
  }

  .ivu-input[disabled],
  fieldset[disabled] .ivu-input {
    background-color: #fff;
    color: #515a6e;
  }
  .ivu-select-disabled .ivu-select-selection {
    background-color: #fff;
    color: #515a6e;
  }
</style>
